package com.yfbao.horizon.sacn;

import lombok.Data;

import java.util.List;

@Data
public class ApiMethodVo {
    private String serviceName;

    private String className;
    private String classSimpleName;
    private String classDesc;

    private String methodName;
    private String methodFunctionDesc ;
    private String methodDesc;
    private String url;

//    private String paramsValue;
    private List<String> params;

    private String returnDesc;
    private String returnValueType;

    private boolean isOpenApi = false;

    public void setParams(List<String> params) {
        this.params = params;
//        if(params!=null){
//            StringBuilder builder = new StringBuilder();
//            for (String param : params) {
//                builder.append(param).append(",");
//            }
//            if(builder.length()>1){
//                this.paramsValue = builder.toString().substring(0,builder.length()-1);
//            }
//        }
    }


//    public String getParamsValue() {
//        if(this.params!=null){
//            StringBuilder builder = new StringBuilder();
//            for (String param : this.params) {
//                builder.append(param).append(",");
//            }
//            if(builder.length()>1){
//                this.paramsValue = builder.toString().substring(0,builder.length()-1);
//            }
//        }
//        return paramsValue;
//    }


    public String toString(){
        return this.getClassName()+","
                +this.getClassDesc()+","
                +this.getMethodDesc()+","
                +this.getMethodName()+","
                +this.getParams()+","
                +this.getReturnValueType();
    }
}
